//
//  GroupMsgDao.h
//  SportSocial
//
//  Created by yull on 15/1/22.
//  Copyright (c) 2015年 yull. All rights reserved.
//

#import "BaseDao.h"
#import "GroupChatMsg.h"

@interface GroupMsgDao : BaseDao

- (BOOL)checkExistWithChatMsg:(GroupChatMsg *)chatMsg;

- (BOOL)insertGroupChatMsg:(GroupChatMsg *)groupMsg;

- (BOOL)updateChatMsg:(GroupChatMsg *)chatMsg;

- (BOOL)updateSendStatusWithDbId:(UInt64)dbId status:(ChatMsgSendStatus)status;

- (BOOL)receiveGroupMsgArray:(NSArray *)chatMsgArray;

- (NSArray *)selectAllGroupMsgArrayWithGroupId:(UInt64)groupId;

- (NSArray *)selectHistoryGroupMsgArrayWithGroupId:(UInt64)groupId dbId:(UInt64)dbId;

- (BOOL)updateMsgId:(UInt64)msgId preview:(NSString *)preview original:(NSString *)original;

- (BOOL)updateReadWithDBId:(UInt64)dbId;

- (NSArray *)selectAllPicMsgWithGroupId:(UInt64)groupId;

- (BOOL)clearSendingMessageToFail;

- (BOOL)deleteAllMsgWithGroupId:(UInt64)groupId;

@end
